home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
DB_CLIPP
/
0769B.ZIP
/
CLEARBUF.PRG
< prev
next >
Wrap
Text File
|
1986-04-13
|
3KB
|
71 lines
************************
* Name CLEARBUF.prg
* Date 10/30/85
* Author Steve Straley
* Note This program will demonstrate how the keyboard buffer can be
* cleared in your programs. The statement CALL _cclr is
* the actual command which clears the keyboard buffer.
*
* To really see the difference between the two test sets, try
* entering characters (even the return key) as fast as you can.
* On the first set, the frames should go by quickly especially if
* the return key was pushed 4 or 5 times in rapid succession.
* However, on the second set, notice that even though the return
* key is hit several times, the prompt to hit any key stops and
* waits for a respons. This difference is due to the keyboard
* buffer being cleared.
***********************
CLEAR
looping = .T.
DO WHILE looping
input_it = "1"
@ 1,18 SAY "Please type in numbers as fast as possible."
@ 2,0,21,79 BOX CHR(177)
@ 12,30 SAY "Any Key for next screen..." GET input_it
READ
@ 2,0,21,79 BOX CHR(222) + CHR(223) + CHR(221) + CHR(221) ;
+ CHR(221) + CHR(220) + CHR(222) + CHR(222) + " "
@ 12,30 SAY "Any Key for next screen..." GET input_it
READ
@ 2,0,21,79 BOX CHR(42)
@ 12,30 SAY "Any Key for next screen..." GET input_it
READ
@ 2,0,21,79 BOX CHR(201) + CHR(205) + CHR(187) + CHR(186) ;
+ CHR(188) + CHR(205) + CHR(200) + CHR(186) + " "
@ 12,30 SAY "Any Key for next screen..." GET input_it
READ
@ 24,10 SAY "Would you like to try this again? " GET looping
READ
ENDDO
CLEAR
looping = .T.
DO WHILE looping
input_it = "1"
@ 1,18 SAY "Please type in numbers as fast as possible."
@ 2,0,21,79 BOX CHR(177)
@ 12,30 SAY "Any Key for next screen..." GET input_it
CALL _cclr
READ
@ 2,0,21,79 BOX CHR(222) + CHR(223) + CHR(221) + CHR(221) ;
+ CHR(221) + CHR(220) + CHR(222) + CHR(222) + " "
@ 12,30 SAY "Any Key for next screen..." GET input_it
CALL _cclr
READ
@ 2,0,21,79 BOX CHR(42)
@ 12,30 SAY "Any Key for next screen..." GET input_it
CALL _cclr
READ
@ 2,0,21,79 BOX CHR(201) + CHR(205) + CHR(187) + CHR(186) ;
+ CHR(188) + CHR(205) + CHR(200) + CHR(186) + " "
@ 12,30 SAY "Any Key for next screen..." GET input_it
CALL _cclr
READ
@ 24,10 SAY "Would you like to try this again? " GET looping
CALL _cclr
READ
ENDDO
--End--